<extend name="Public/common" />
<block name="body">
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>系统设置</h3>
      <ul class="tab-base">
        <li><a class="current"><span>系统设置</span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form method="post" enctype="multipart/form-data" name="form1">
    <table class="table tb-type2">
      <tbody>
        <tr class="noborder">
          <td colspan="2" class="required"><label for="site_name">网站名称:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="site_name" name="site_name" value="{$info['site_name']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">网站名称，将显示在前台顶部欢迎信息等位置</span></td>
        </tr>
        
        <tr>
          <td colspan="2" class="required"><label for="telephone">客服电话:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="telephone" name="telephone" value="{$info['telephone']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">客服电话，多个请用半角逗号 "," 隔开</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required">关注后送代金券:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform onoff">
            <label for="send_coupon1" class="cb-enable <eq name='info.send_coupon' value='1'>selected</eq>" ><span>开启</span></label>
            <label for="send_coupon0" class="cb-disable <eq name='info.send_coupon' value='0'>selected</eq>" ><span>关闭</span></label>
            <input id="send_coupon1" name="send_coupon" <eq name='info.send_coupon' value='1'>checked="checked"</eq> value="1" type="radio">
            <input id="send_coupon0" name="send_coupon" <eq name='info.send_coupon' value='0'>checked="checked"</eq> value="0" type="radio">
          </td>
          <td class="vatop tips"><span class="vatop rowform">关闭后不送代金券</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label class="validation" for="send_coupon_id">代金券:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="send_coupon_id" id="send_coupon_id">
            <option value="">代金券</option>
            <notempty name="coupon">
              <volist name="coupon" id="vo">
                <option <eq name="info.send_coupon_id" value="$vo['coupon_id']">selected='selected'</eq> value="{$vo['coupon_id']}">{$vo['coupon_name']}</option>
              </volist>
            </notempty>
          </select></td>
          <td class="vatop tips">关注后送的代金券</td>
        </tr>



        <tr>
          <td colspan="2" class="required">订单支付后送代金券:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform onoff">
            <label for="order_send_coupon1" class="cb-enable <eq name='info.order_send_coupon' value='1'>selected</eq>" ><span>开启</span></label>
            <label for="order_send_coupon0" class="cb-disable <eq name='info.order_send_coupon' value='0'>selected</eq>" ><span>关闭</span></label>
            <input id="order_send_coupon1" name="order_send_coupon" <eq name='info.order_send_coupon' value='1'>checked="checked"</eq> value="1" type="radio">
            <input id="order_send_coupon0" name="order_send_coupon" <eq name='info.order_send_coupon' value='0'>checked="checked"</eq> value="0" type="radio">
          </td>
          <td class="vatop tips"><span class="vatop rowform">关闭后不送代金券</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label class="validation" for="send_coupon_id">订单支付后送代金券:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="order_send_coupon_id" id="order_send_coupon_id">
            <option value="">代金券</option>
            <notempty name="coupon">
              <volist name="coupon" id="vo">
                <option <eq name="info.order_send_coupon_id" value="$vo['coupon_id']">selected='selected'</eq> value="{$vo['coupon_id']}">{$vo['coupon_name']}</option>
              </volist>
            </notempty>
          </select></td>
          <td class="vatop tips">订单支付后送代金券</td>
        </tr>


        <tr>
          <td colspan="2" class="required">邀请好友送代金券:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform onoff">
            <label for="invite_coupon1" class="cb-enable <eq name='info.invite_coupon' value='1'>selected</eq>" ><span>开启</span></label>
            <label for="invite_coupon0" class="cb-disable <eq name='info.invite_coupon' value='0'>selected</eq>" ><span>关闭</span></label>
            <input id="invite_coupon1" name="invite_coupon" <eq name='info.invite_coupon' value='1'>checked="checked"</eq> value="1" type="radio">
            <input id="invite_coupon0" name="invite_coupon" <eq name='info.invite_coupon' value='0'>checked="checked"</eq> value="0" type="radio">
          </td>
          <td class="vatop tips"><span class="vatop rowform">关闭后不送代金券</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label class="validation" for="invite_coupon_id">邀请好友送代金券:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="invite_coupon_id" id="invite_coupon_id">
            <option value="">代金券</option>
            <notempty name="coupon">
              <volist name="coupon" id="vo">
                <option <eq name="info.invite_coupon_id" value="$vo['coupon_id']">selected='selected'</eq> value="{$vo['coupon_id']}">{$vo['coupon_name']}</option>
              </volist>
            </notempty>
          </select></td>
          <td class="vatop tips">邀请后送代金券</td>
        </tr>

        <tr>
          <td colspan="2" class="required">每天截止时间:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="order_time" name="order_time" value="{$info['order_time']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">每天的截止时间 必须是00:00:00 样式的时分秒</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required">每天的配送时间:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="deliver_time" name="deliver_time" value="{$info['deliver_time']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">每天的配送时间 必须是xx:xx-xx:xx 样式的小时:分钟-小时:分钟</span></td>
        </tr>


        <tr>
          <td colspan="2" class="required">库存活动:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform onoff">
            <label for="storage_activity1" class="cb-enable <eq name='info.storage_activity' value='1'>selected</eq>" ><span>开启</span></label>
            <label for="storage_activity0" class="cb-disable <eq name='info.storage_activity' value='0'>selected</eq>" ><span>关闭</span></label>
            <input id="storage_activity1" name="storage_activity" <eq name='info.storage_activity' value='1'>checked="checked"</eq> value="1" type="radio">
            <input id="storage_activity0" name="storage_activity" <eq name='info.storage_activity' value='0'>checked="checked"</eq> value="0" type="radio">
          </td>
          <td class="vatop tips"><span class="vatop rowform">库存进度条活动</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label class="validation" for="article_num">关注文章数量:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="article_num" id="article_num">
            <option <eq name="info.article_num" value="1">selected='selected'</eq> value="1">1</option>
            <option <eq name="info.article_num" value="2">selected='selected'</eq> value="2">2</option>
            <option <eq name="info.article_num" value="3">selected='selected'</eq> value="3">3</option>
            <option <eq name="info.article_num" value="4">selected='selected'</eq> value="4">4</option>
            <option <eq name="info.article_num" value="5">selected='selected'</eq> value="5">5</option>
          </select></td>
          <td class="vatop tips">关注文章数量最多5个最少1个</td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label for="deliver_amount">配送费:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="deliver_amount" name="deliver_amount" value="{$info['deliver_amount']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">正整数</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label for="dishware_amount">餐盒费:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="dishware_amount" name="dishware_amount" value="{$info['dishware_amount']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">正整数</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required">第二份半价:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="discount_day" name="discount_day" value="{$info['discount_day']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">第二份半价 开始时间 这里是时间戳（年-月-日 00:00:00） 设置0的话 是不开启 </span></td>
        </tr>

<!--
        <tr>
          <td colspan="2" class="required">短信平台:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform onoff">
          	<label for="sms1" class="cb-enable <eq name='info.sms' value='1'>selected</eq>" ><span>开启</span></label>
            <label for="sms0" class="cb-disable <eq name='info.sms' value='0'>selected</eq>" ><span>关闭</span></label>
            <input id="sms1" name="sms" <eq name='info.sms' value='1'>checked="checked"</eq> value="1" type="radio">
            <input id="sms0" name="sms" <eq name='info.sms' value='0'>checked="checked"</eq> value="0" type="radio">
          </td>
          <td class="vatop tips"><span class="vatop rowform">短信平台，关闭后无法发送短信</span></td>
        </tr>        
        
         <tr>
          <td colspan="2" class="required"><label for="sms_host">短信平台主机:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="sms_host" name="sms_host" value="{$info['sms_host']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。短信平台接口主机地址</span></td>
        </tr>

         <tr>
          <td colspan="2" class="required"><label for="sms_user">短信平台用户:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="sms_user" name="sms_user" value="{$info['sms_user']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。短信平台用户</span></td>
        </tr>
        
        <tr>
          <td colspan="2" class="required"><label for="sms_password">短信平台密码:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="sms_password" name="sms_password" value="{$info['sms_password']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。短信平台密码</span></td>
        </tr>

        <tr>
          <td colspan="2" class="required"><label for="sms_params">短信平台其他参数:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea name="sms_params" rows="6" class="tarea" id="sms_params" >{$info['sms_params']}</textarea></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。短信平台其他参数信息</span></td>
        </tr>
        
        <tr>
          <td colspan="2" class="required"><label for="sms_extend">短信平台扩展:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea name="sms_extend" rows="6" class="tarea" id="sms_extend" >{$info['sms_extend']}</textarea></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。短信平台参数对应信息</span></td>
        </tr>        
        
        <tr>
          <td colspan="2" class="required"><label for="sms_content">短信验证码信息:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea name="sms_content" rows="6" class="tarea" id="sms_content" >{$info['sms_content']}</textarea></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。注册时候发送的验证码短信内容{code}不可以改动</span></td>
        </tr>
        
        <tr>
          <td colspan="2" class="required"><label for="sms_sign">短信后缀签名:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="sms_sign" name="sms_sign" value="{$info['sms_sign']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。短信平台要求必须带后缀签名不然发送失败。格式为【XXX】</span></td>
        </tr>
 
         <tr>
          <td colspan="2" class="required"><label for="sms_sign">默认权限:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input id="sms_sign" name="default_auth" value="{$info['default_auth']}" class="txt" type="text" /></td>
          <td class="vatop tips"><span class="vatop rowform">非系统人员，不建议改动。</span></td>
        </tr>
        -->
      </tbody>
      <tfoot id="submit-holder">
        <tr class="tfoot">
          <td colspan="2" ><a href="JavaScript:void(0);" class="btn" onclick="document.form1.submit()"><span>提交</span></a></td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript">
$(function() {
	$("#start_image").change(function() {
		$("#textfield1").val($(this).val());
	});
	$("#share_image").change(function(){
		$("#textfield2").val($(this).val());
	});
	$('input[class="type-file-file"]').change( function() {
		var filepatd = $(this).val();
		var extStart = filepatd.lastIndexOf(".");
		var ext = filepatd.substring(extStart, filepatd.lengtd).toUpperCase();
		if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
			alert("图片限于png,gif,jpeg,jpg格式");
			$(this).attr('value', '');
			return false;
		}
	});
});
</script>
</block>